//
//  PushToEntity.swift
//  weile
//
//  Created by LKM on 16/12/13.
//  Copyright © 2016年 LKM. All rights reserved.
//

import Foundation
import SwiftyJSON 

class PushToEntity: NSObject{

    var type:Int = 0;//= json["wl_c"]["t"].int ?? 0 ;
    var data:[String:JSON] = [:];//
    
    
    init?(userInfo: [AnyHashable : Any]) {
        super.init()
        let jsonD = userInfo[AnyHashable("wl_c") ]//as? String;
        LKMLog("====jsonD \(jsonD)")
        if jsonD == nil {
            return nil
        }
        
        let json = JSON(jsonD )
        
        type = json["t"].int ?? 0
        data = json["d"].dictionary ?? [:];
        
    }
    init(json :JSON) {
         super.init()
        type = json["wl_c"]["t"].int ?? 0 ;
        data = json["wl_c"]["d"].dictionary ?? [:];
    }
    
}
